package day10;


import java.io.FileReader;
import java.io.IOException;
import java.util.Arrays;

/**
 * @author joker
 * @date 2022/4/20 0020 - 23:30
 */
public class FileTest4 {
    public static void main(String[] args) {
        try {
            FileReader fr = new FileReader("hello.txt");
            char[] cubf=new char[5];
            int len;
            while ((len=fr.read(cubf))!=-1){
                System.out.println(Arrays.toString(cubf));
                System.out.println(len);
                String s = new String(cubf, 0, len);
                System.out.println(s);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
        }
    }

}
